package com.ychug.front.template.directive;

import com.ychug.front.template.freemarker.BaseTag;
import com.ychug.front.template.freemarker.Freemarkers;
import com.ychug.front.template.freemarker.TagBase;
import com.ychug.service.system.entity.SysConfigEntity;
import com.ychug.service.system.service.ISysConfigService;
import freemarker.core.Environment;
import freemarker.template.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.util.List;
import java.util.Map;
@Component
public class SiteTagDirective extends TagBase {

        public static final String ID = "id";
        public static final String NUMBER = "number";
        @Autowired
        private ISysConfigService iSysConfigService;


    public void onRender() {
        List<SysConfigEntity> sysConfigEntityList = iSysConfigService.selectConfigList(new SysConfigEntity());
        setVariable("ad", sysConfigEntityList);
        renderBody();
    }


}
